package cn.com.ntr.jhclient;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RelativeLayout;

public class PersonalResumeActivity extends Activity {
	private Button btnBack,btnViewResume;
	private RelativeLayout relaBasic,relaWork,relaTrain,relaLang,relaEdu,relaApplyJob;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_personal_resume);
		init();
		registerListener();

	}

	private void init() {
		btnBack = (Button) findViewById(R.id.btn_back);
		btnViewResume=(Button)findViewById(R.id.btn_self_resume);
		relaBasic=(RelativeLayout)findViewById(R.id.linear_basic_info);
		relaWork=(RelativeLayout)findViewById(R.id.linear_work);
		relaLang=(RelativeLayout)findViewById(R.id.linear_lang);
		relaTrain=(RelativeLayout)findViewById(R.id.linear_train_info);
		relaEdu=(RelativeLayout)findViewById(R.id.linear_edu_info);
		relaApplyJob=(RelativeLayout)findViewById(R.id.linear_apply_job);
	}

	private void registerListener() {
		btnBack.setOnClickListener(clickListener);
		btnViewResume.setOnClickListener(clickListener);
		relaBasic.setOnClickListener(clickListener);
		relaWork.setOnClickListener(clickListener);
		relaLang.setOnClickListener(clickListener);
		relaTrain.setOnClickListener(clickListener);
		relaEdu.setOnClickListener(clickListener);
		relaApplyJob.setOnClickListener(clickListener);
	}

	private OnClickListener clickListener = new OnClickListener() {

		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			switch (v.getId()) {
			case R.id.btn_back:
				finish();
				break;
			case R.id.btn_self_resume:
				startActivity(new Intent(PersonalResumeActivity.this, ResumeViewActivity.class));
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);
				break;
			case R.id.linear_basic_info:
				startActivity(new Intent(PersonalResumeActivity.this, BasicInfoActivity.class));
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);
				break;
			case R.id.linear_work:
				startActivity(new Intent(PersonalResumeActivity.this, ExperListActivity.class));
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);
				break;
			case R.id.linear_lang:
				startActivity(new Intent(PersonalResumeActivity.this, LangListActivity.class));
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);
				break;
			case R.id.linear_train_info:
				startActivity(new Intent(PersonalResumeActivity.this, TrainListActivity.class));
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);
				break;
			case R.id.linear_edu_info:
				startActivity(new Intent(PersonalResumeActivity.this, EducaListActivity.class));
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);
				break;
			case R.id.linear_apply_job:
				startActivity(new Intent(PersonalResumeActivity.this, JobIntensionActivity.class));
				overridePendingTransition(R.anim.push_left_in,
						R.anim.push_left_out);
				break;
			default:
				break;
			}
		}
	};
}
